home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Form1"
- ClientHeight = 5052
- ClientLeft = 1368
- ClientTop = 1644
- ClientWidth = 5724
- Height = 5472
- Left = 1320
- LinkTopic = "Form1"
- ScaleHeight = 5052
- ScaleWidth = 5724
- Top = 1272
- Width = 5820
- Begin MListBox MList1
- Alignment = 0 'None
- AllowFocusRect = -1 'True
- BorderStyle = 0 'Normal
- CheckColor = &H00000000&
- CheckStyle = 1 'Check Mark
- DrawRegions = 2
- EnableVirtualMsgs= -1 'True
- ExtendedSelect = 0 'False
- FallColor = &H00808080&
- FindDirection = 0 'Forward
- GridColor = &H00000000&
- GridStyle = 0 'Solid
- Height = 4524
- HiliteBackColor = &H00000000&
- HiliteForeColor = &H00000000&
- HorizontalGrids = 0 'False
- ImageRegion = 1
- ImageType = 0 'None
- ItemHeight = 300
- ItemWidth = 1560
- Left = 144
- MaskingColor = &H00FFFFFF&
- MultiColumn = 0 'False
- MultiSelect = 0 'False
- RiseColor = &H00FFFFFF&
- Sorted = 0 'False
- TabIndex = 0
- Top = 144
- Version = "04.20"
- VerticalGrids = 0 'False
- VirtualMsgZone = 10
- Width = 5148
- End
- Sub Form_Load ()
- Dim X As Integer
- For X = 0 To 9
- MList1.AddItem "Section1"
- Next X
- For X = 0 To 5
- MList1.AddItem "This is a test string"
- MList1.AddItem "This is a test string II"
- MList1.AddItem "This is a test string III"
- MList1.AddItem "This is a test string III"
- Next X
- End Sub
- Sub MList1_VirtualMessage (Message As Integer)
- If Message = 1 Or Message = 3 Then
- Dim I As Integer
- Dim Index As Integer
- Dim TopIndex As Integer
- If MList1.List(0) = "Section1" Then
-
- Index = MList1.ListIndex
- TopIndex = MList1.TopIndex
- For I = 0 To 9
- MList1.AddItem "Section II"
- Next I
-
- For I = 0 To 9
- MList1.RemoveItem 0
- Next I
- MList1.TopIndex = TopIndex - 10
- MList1.ListIndex = Index - 10
- End If
- Else
- If MList1.List(0) <> "Section1" Then
-
- Index = MList1.ListIndex
- TopIndex = MList1.TopIndex
- For I = 0 To 9
- MList1.AddItem "Section1", 0
- Next I
-
- For I = 0 To 9
- MList1.RemoveItem MList1.ListCount - 1
- Next I
- MList1.TopIndex = TopIndex + 10
- MList1.ListIndex = Index + 10
- End If
- End If
- End Sub
-